<template>
 <view class="content_view">
  <u-navbar title-color="#FFFFFF" height="48" back-icon-color="#FFFFFF" :border-bottom="false" :is-fixed="true" :title="'预计整改时间'"
   :customBack="back"></u-navbar>
  <view>
   <u-form :model="feedbackForm" ref="feedbackForm" label-width="100px" style="padding: 24rpx;">
    <u-form-item label-position="left" label=整改时间>
     <u-input type="text" :border="border" placeholder="整改时间" v-model="feedbackForm.fireControlTime" @click="show =true" />
    </u-form-item>   
   </u-form>
   <u-picker v-model="show" mode="time" :params="params" @confirm="confirmEnd">feedbackForm</u-picker>
  </view>
  <u-button @click="submit" type="primary" style="margin: 24rpx;">确认</u-button>
 </view>
</template>

<script>
 export default {
  data() {
   return {
    show: false,
    mode: 'range',
    border: true,
    feedbackForm: {
     
    },
    params:{
     year: true,
     month: true,
     day: true,
     hour: true,
     minute: true,
     second: true
    }
   }
  },
  methods: {

   onLoad(e) {
    console.log(e.ucId)

    this.feedbackForm.ucId = e.ucId
   },
   onShow() {

   },
   back() {
    window.native.back()
   },
   submit() {
    this.utils.request("/api/app/maintenanceRecord/updateInMaintenanceRecord", this.feedbackForm, "post", "app", true).then(res => {
     uni.navigateBack({
      delta: 1
     })
    }).catch(error => {
     console.log(error)
    })
   },
   
   confirmEnd(e) {
    console.log(e)
    this.feedbackForm.fireControlTime = e.year + '-' + e.month + '-' + e.day+' '+e.hour + ':' + e.minute + ':' + e.second;
   }
  }
 }
</script>

<style lang="scss" scoped>
 .title {
  color: $u-type-primary;
  text-align: center;
  padding: 20rpx 0 0 0;
 }
</style>